Ansible Configuration for VM¶
For the future, we shall deploy to Azure Cloud via a standardized methodology and set of tools, e.g.
Setup¶
sudo dnf install ansible az
az login
az ad sp create-for-rbac -n "Name"
az account show
Continue:
mkdir ~/.azure
nano ~/.azure/credentials
[default]
subscription_id=<your-subscription_id>
# app id
client_id=<security-principal-appid>
# these are generated after `sp create` command
secret=<security-principal-password>
tenant=<security-principal-tenant>
Deployment¶
There are 2 options where you can create servers, e.g. where to execute playbooks.
Either in azure cloud-shell
where ansible is already preinstalled or on some Linux VM (either on server or desktop).
In any case you will need to have azure credentials file being stored & prepared.
My assumption here is local PC (fedora).
For the Ansible playbook
, see server-config
branch and then execute:
ansible-playbook
ansible-playbook playbook.yml --check